package com.sprouting.ops.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sprouting.ops.annotations.invoke.CheckIsNullOrEmpty;
import com.sprouting.ops.annotations.invoke.CheckLength;
import com.sprouting.ops.annotations.invoke.CheckNotNull;
import com.sprouting.ops.interfaces.AddGroup;
import com.sprouting.ops.interfaces.UpdGroup;
import lombok.Data;

/**
 * 知识中心(OpsKnowledge)(OPS_KNOWLEDGE) 表实体类
 *
 * @author ：lx（长沙麓谷）
 * @date 创建时间：2025-08-21 22:45:33
 */
@Data
@TableName("ops_knowledge")
public class OpsKnowledge extends BaseModel {

    /**
     * 主键
     */
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @CheckIsNullOrEmpty(message = "无效ID", groups = AddGroup.class)
    @TableId
    private String id;
    /**
     * 标题
     */
    @CheckLength(min = 1, max = 150, message = "标题超过长度限制")
    @CheckNotNull(message = "请输入标题")
    private String title;
    /**
     * 内容
     */
    private String content;
    /**
     * 标签
     * @see OpsSysDict#getId()
     */
    private String tags;
    /**
     * 状态 已过时，发布
     * @see com.sprouting.ops.interfaces.ConstantBase.KnowledgeStatus
     */
    private Integer status;
    /**
     * 阅读次数
     */
    private Integer readNum;
    /**
     * 喜欢的数量
     */
    private Integer likeNum;
    /**
     * 踩的数量
     */
    private Integer dislikesNum;
    /**
     * 得分
     * 五颗星
     */
    private Integer score;
    /**
     * 面向人群
     * @see OpsSysDict#getId()
     */
    private String audience;

}
